//
//  MessageHotel.m
//  YouthHostel
//
//  Created by administrator on 16/10/29.
//  Copyright © 2016年 Lorain mac pro. All rights reserved.
//

#import "MessageHotel.h"
#import "Define.h"
#define URL1 @"https://zm12.sm-tc.cn/?src=http%3A%2F%2Fwww.landscape.cn%2Fnews%2Fevents%2Findustry%2F2014%2F0716%2F152461.html&uid=b06020bd64714c73cda052c6b447b49a&hid=2feacd3430c7fc0d3b699adcb981878d&pos=4&cid=9&time=1477709497879&from=click&restype=1&pagetype=0000104000008402&bu=structure_web_info&query=%E5%9B%BD%E5%86%85%E6%9C%89%E5%93%AA%E4%BA%9B%E9%80%A0%E5%9E%8B%E5%A5%87%E7%89%B9%E7%9A%84%E6%96%B0%E5%9E%8B%E9%85%92%E5%BA%97&mode=&uc_param_str=dnntnwvepffrgibijbprsvdsei"//盘点中国那些奇特的新型酒店
#define URL2 @"http://mp.weixin.qq.com/s?__biz=MzA4ODcxNTM2NA%3D%3D&mid=2649535756&idx=1&sn=9d55c8a9db8494f66b2a4a3c9867ba1e&scene=1&srcid=0523V0pR8GRP3IDhlCahnOdO&from=singlemessage&isappinstalled=0&open_source=weibo_search&open_source=weibo_search"//走进日本情趣酒店
#define URL3 @""
#define URL4 @""
#define URL5 @""
#define URL6 @""
#define URL7 @""
#define URL8 @""
#define URL9 @""
#define URL10 @""

@interface MessageHotel ()
@property (strong,nonatomic)UIWebView *webView;
//导航栏
@property (strong,nonatomic)UIView *nav;
//标题
@property (strong,nonatomic)UILabel *titleLab;
//返回
@property (strong,nonatomic)UIButton *backBtn;

@end

@implementation MessageHotel

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, WIDTH, HEIGHT-64)];
    
//    self.urlStr = @"http://mp.weixin.qq.com/s?__biz=MzA4ODcxNTM2NA%3D%3D&mid=2649535756&idx=1&sn=9d55c8a9db8494f66b2a4a3c9867ba1e&scene=1&srcid=0523V0pR8GRP3IDhlCahnOdO&from=singlemessage&isappinstalled=0&open_source=weibo_search&open_source=weibo_search";
//    
    NSURL *url = [NSURL URLWithString:_urlStr];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    
    [self.webView loadRequest:request];
    
    self.nav = [[UIView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 64)];
    self.nav.backgroundColor = [UIColor colorWithRed:56/255.0 green:143/255.0 blue:214/255.0 alpha:1];
    
    self.titleLab = [[UILabel alloc]initWithFrame:CGRectMake(100, 20, WIDTH-200, 34)];
    self.titleLab.textAlignment = NSTextAlignmentCenter;
    self.titleLab.text = @"发现文章";
    self.titleLab.textColor = [UIColor whiteColor];
    self.titleLab.font = [UIFont systemFontOfSize:20];
    
    self.backBtn = [[UIButton alloc]initWithFrame:CGRectMake(10, 25, 25, 25)];
    [self.backBtn setImage:[UIImage imageNamed:@"后退"] forState:UIControlStateNormal];
    [self.backBtn addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:_nav];
    [self.nav addSubview:_titleLab];
    [self.nav addSubview:_backBtn];

    
    
    
    [self.view addSubview:_webView];




}



- (void)back:(UIButton *)sender{
    [self.navigationController popViewControllerAnimated:YES];
}



@end
